﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FazaDemo.ViewModels;

namespace FazaDemo.PL.Wpf
{
    class EntityUnloaderFactory
    {

        public IEntityUnloader Create(object model)
        {
            if (model.GetType() == typeof(DistrictViewModel))
            {
                return new DistrictEntityUnloader(model as DistrictViewModel);
            }
            if (model.GetType() == typeof(PlaceViewModel))
            {
                return new PlaceEntityUnloader(model as PlaceViewModel);
            }
            return default(IEntityUnloader);
        }

    }
}
